const changeModel = (modelStr) => {
  let list = []
  try {
    list = JSON.parse(modelStr)
  } catch (e) {
    list = []
  }
  if (list.length === 0) {
    return false
  } else {
    list.forEach((r) => {
      r.forEach((i, index) => {
        r[index] = -1 * i
      })
    })
    return JSON.stringify(list)
  }
}

console.log(changeModel('[[-1,-1,0],[1,0,-1],[1,1,0],[1,1,0]]'))
